<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
    CodeFile="AssetMaintain.aspx.vb" Inherits=" WebForm_AssetMaintain" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<%@ Register Src="Component/AssetMaintain.ascx" TagName="AssetMaintain" TagPrefix="uc1" %>
<%@ Register Src="Component/AssetEliminate.ascx" TagName="AssetEliminate" TagPrefix="uc2" %>
<%@ Register Src="Component/AssetTransfer.ascx" TagName="AssetTransfer" TagPrefix="uc3" %>
<%@ Register Src="Component/AssetFlowER.ascx" TagName="AssetFlowER" TagPrefix="uc4" %>
<%@ Register Src="Component/AssetReply.ascx" TagName="AssetReply" TagPrefix="uc5" %>
<%@ Register Src="Component/AssetHelp.ascx" TagName="AssetHelp" TagPrefix="uc6" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:HiddenField ID="hiUID" runat="server" />
            <asp:HiddenField ID="hiDBName" runat="server" />
           
            <asp:ObjectDataSource ID="dbAssetDef" runat="server" SelectMethod="GetAssetType"
                TypeName="AssetManage.BBL.AssetBBL">
                <SelectParameters>
                    <asp:Parameter DefaultValue="1" Name="kind" Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" DefaultValue="" Name="dbName" PropertyName="Value"
                        Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <asp:ObjectDataSource ID="dbASSET" runat="server" SelectMethod="GetAssetData" TypeName="AssetManage.BBL.AssetBBL">
                <SelectParameters>
                    <asp:ControlParameter ControlID="ddlAssetDef" Name="assetdef_id" PropertyName="SelectedValue"
                        Type="String" DefaultValue="0" />
                    <asp:ControlParameter ControlID="txtowner" Name="asset_owner" PropertyName="Text"
                        Type="String" ConvertEmptyStringToNull="False" DefaultValue="" />
                    <asp:ControlParameter ControlID="txtAsset_SerialNo" Name="asset_SerialNo" PropertyName="Text"
                        Type="String" ConvertEmptyStringToNull="False" DefaultValue="" />
                    <asp:ControlParameter ControlID="txtDept" Name="Dept" PropertyName="Text" Type="String"
                        ConvertEmptyStringToNull="False" DefaultValue="" />
                    <asp:ControlParameter ControlID="ddlHouseID" Name="HouseID" PropertyName="SelectedValue"
                        Type="String" ConvertEmptyStringToNull="False" DefaultValue="" />
                    <asp:ControlParameter ControlID="txtMAC" Name="MAC" PropertyName="Text" Type="String"
                        ConvertEmptyStringToNull="False" />
                    <asp:ControlParameter ControlID="txtComputerName" Name="ComputerName" PropertyName="Text"
                        Type="String" ConvertEmptyStringToNull="False" />
                    <asp:ControlParameter ControlID="lblIP" Name="IP" PropertyName="Text" Type="String"
                        ConvertEmptyStringToNull="False" />
                    <asp:ControlParameter ControlID="ddlasset_status" Name="asset_status" PropertyName="SelectedValue"  DefaultValue =""
                        ConvertEmptyStringToNull="False" />
                    <asp:ControlParameter ControlID="hiDBName" ConvertEmptyStringToNull="False" 
                        DefaultValue="" Name="dbName" PropertyName="Value" Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <asp:ObjectDataSource ID="dbOAStatus" runat="server" SelectMethod="GetOAStatus" 
                TypeName="AssetManage.BBL.AssetBBL">
                <SelectParameters>
                    <asp:Parameter DefaultValue="1" Name="kind" Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" DefaultValue="" Name="dbName" 
                        PropertyName="Value" Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <table>
                <tr>
                    <td style="text-align: center">
                        <asp:Label ID="lblTitle" runat="server" Font-Bold="True" Font-Size="24px" meta:resourcekey="lblTitle"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: center">
                        <asp:Label ID="lbMode" runat="server" Font-Bold="True" Font-Size="14px" meta:resourcekey="lbMode"
                            ForeColor="Red"></asp:Label>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Label ID="txtMaintain" runat="server" BorderStyle="Solid" ReadOnly="True" meta:resourcekey="txtMaintain"
                            BorderWidth="1px"></asp:Label>
                        <asp:Label ID="txtEliminate" runat="server" BorderColor="Black" BorderStyle="Solid"
                            ReadOnly="True" meta:resourcekey="txtEliminate" BorderWidth="1px"></asp:Label>
                        <asp:Label ID="txtTransfer" runat="server" BorderColor="Black" BorderStyle="Solid"
                            ReadOnly="True" meta:resourcekey="txtTransfer" BorderWidth="1px"></asp:Label>
                        <asp:Label ID="txtFlowER" runat="server" BorderColor="Black" BorderStyle="Solid"
                            ReadOnly="True" meta:resourcekey="txtFlowER" BorderWidth="1px"></asp:Label>
                        <asp:Label ID="txtReply" runat="server" BorderColor="Black" BorderStyle="Solid" ReadOnly="True"
                            meta:resourcekey="txtReply" BorderWidth="1px"></asp:Label>
                        <asp:Label ID="txtSOP" runat="server" BorderColor="Black" BorderStyle="Solid" ReadOnly="True"
                            meta:resourcekey="txtSOP" BorderWidth="1px"></asp:Label>
                    </td>
                </tr>
                <tr style="vertical-align: text-top">
                    <td>
                        <table border="1" width="900px">
                            <tr>
                                <td align="right" style="width: 111px">
                                    <asp:Label ID="lblAssetDef" runat="server" meta:resourcekey="lblAssetDef"></asp:Label>
                                </td>
                                <td style="width: 182px">
                                    <asp:DropDownList ID="ddlAssetDef" runat="server" Width="120px" DataSourceID="dbAssetDef"
                                        DataTextField="name" DataValueField="id">
                                    </asp:DropDownList>
                                </td>
                                <td align="right" style="width: 144px">
                                    <asp:Label ID="lblAssetowner" runat="server" meta:resourcekey="lblAssetowner"></asp:Label>
                                </td>
                                <td style="width: 204px">
                                    <asp:TextBox ID="txtowner" runat="server" Width="80px"></asp:TextBox>
                                </td>
                                <td align="right" style="width: 111px">
                                    <asp:Label ID="lblAsset_SerialNo" runat="server" meta:resourcekey="lblAsset_SerialNo"></asp:Label>
                                </td>
                                <td style="width: 182px">
                                    <asp:TextBox ID="txtAsset_SerialNo" runat="server" Width="80px"></asp:TextBox>
                                </td>
                                <td align="right" style="width: 144px">
                                    <asp:Label ID="lblDept" runat="server" meta:resourcekey="lblDept"></asp:Label>
                                </td>
                                <td style="width: 204px">
                                    <asp:TextBox ID="txtDept" runat="server" Width="80px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" style="width: 111px">
                                    <asp:Label ID="lblHouseID" runat="server" meta:resourcekey="lblHouseID"></asp:Label>
                                </td>
                                <td style="width: 182px">
                                    <asp:DropDownList ID="ddlHouseID" runat="server" Width="120px">
                                        <asp:ListItem meta:resourcekey="HouseID1"></asp:ListItem>
                                        <asp:ListItem meta:resourcekey="HouseID2"></asp:ListItem>
                                        <asp:ListItem meta:resourcekey="HouseID3"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td align="right" style="width: 144px">
                                    <asp:Label ID="lblMAC" runat="server" meta:resourcekey="lblMAC"></asp:Label>
                                </td>
                                <td style="width: 204px">
                                    <asp:TextBox ID="txtMAC" runat="server" Width="80px"></asp:TextBox>
                                </td>
                                <td align="right" style="width: 111px">
                                    <asp:Label ID="lblComputerName" runat="server" meta:resourcekey="lblComputerName"></asp:Label>
                                </td>
                                <td style="width: 182px">
                                    <asp:TextBox ID="txtComputerName" runat="server" Width="80px"></asp:TextBox>
                                </td>
                                <td align="right" style="width: 144px">
                                    <asp:Label ID="lblasset_status" runat="server" 
                                        meta:resourcekey="lblasset_status"></asp:Label>
                                </td>
                                <td style="width: 204px">
                                    <asp:DropDownList ID="ddlasset_status" runat="server" DataSourceID="dbOAStatus" 
                                        DataTextField="name" DataValueField="id" Width="130px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td align="center" colspan="8">
                                    <asp:TextBox ID="txtIP" runat="server" Style="margin-bottom: 0px" 
                                        Visible="False" Width="80px"></asp:TextBox>
                                    <asp:Label ID="lblIP" runat="server" meta:resourcekey="lblIP" Visible="False"></asp:Label>
                                    <asp:LinkButton ID="btnQuery" runat="server" meta:resourcekey="btnQuery"></asp:LinkButton>
                                    &nbsp;
                                    <asp:LinkButton ID="btnApply" runat="server" meta:resourcekey="btnApply"></asp:LinkButton>
                                    &nbsp;
                                    <asp:LinkButton ID="btnReply" runat="server" meta:resourcekey="btnReply"></asp:LinkButton>
                                    &nbsp;<asp:LinkButton ID="btnSOP" runat="server" meta:resourcekey="btnSOP"></asp:LinkButton>&nbsp;
                                    <asp:LinkButton ID="btnInsert" runat="server" meta:resourcekey="btnInsert"></asp:LinkButton>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="8">
                                    <TServerControl:TGridView ID="gvMain" runat="server" AllowHoverEffect="False" AllowHoverSelect="False"
                                        AllowPaging="True" AutoGenerateColumns="False" DataSourceID="dbASSET" ShowFooterWhenEmpty="False"
                                        ShowHeaderWhenEmpty="True" SkinID="pager" TotalRowCount="0" Width="900px">
                                        <Columns>
                                            <asp:TemplateField meta:resourcekey="colMaintain" ItemStyle-Wrap="False">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="btnMaintainDetil" runat="server" meta:resourcekey="btnMaintainDetil"
                                                        OnClick="btnMaintainDetil_Click" CommandArgument='<%# Bind("asset_serialNo") %>'></asp:LinkButton>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField meta:resourcekey="colassetdef_id" DataField="DefName" />
                                            <asp:BoundField meta:resourcekey="colasset_serialNo" DataField="asset_serialNo" />
                                            <asp:BoundField meta:resourcekey="colasset_owner" DataField="ownerName" />
                                            <asp:BoundField meta:resourcekey="colUser2" DataField="UseName" />
                                            <asp:BoundField meta:resourcekey="colasset_status" DataField="asset_status" />
                                            <asp:BoundField meta:resourcekey="colComputerName" DataField="ComputerName" />
                                            <asp:BoundField HeaderText="Class" DataField="Class" />
                                            <asp:BoundField meta:resourcekey="colLocation" DataField="Location" />
                                        </Columns>
                                        <EmptyDataTemplate>
                                            <asp:Label ID="lblEmpty" runat="server" ForeColor="Red" meta:resourcekey="lblEmpty"></asp:Label>
                                        </EmptyDataTemplate>
                                    </TServerControl:TGridView>
                                </td>
                            </tr>
                </tr>
                </table> </td> </tr>
            </table>
            <asp:Panel ID="Panel1" runat="server" ScrollBars="Auto" Height="500px">
                <uc2:AssetEliminate ID="AssetEliminate1" runat="server" Visible="False" />
            </asp:Panel>
            <asp:Panel ID="Panel2" runat="server" ScrollBars="Auto" Height="500px">
                <uc3:AssetTransfer ID="AssetTransfer1" runat="server" Visible="False" />
            </asp:Panel>
            <asp:Panel ID="Panel3" runat="server" ScrollBars="Auto" Height="500px">
                <uc4:AssetFlowER ID="AssetFlowER1" runat="server" />
            </asp:Panel>
            <uc1:AssetMaintain ID="AssetMaintain1" runat="server" />
            <uc5:AssetReply ID="AssetReply1" runat="server" Visible="False" />
            <uc6:AssetHelp ID="AssetHelp1" runat="server" />
            <asp:Button ID="btnEliminate" Style="display: none" runat="server" />
            <asp:Button ID="btnTransfer" Style="display: none" runat="server" />
            <asp:Button ID="btnFlowER" Style="display: none" runat="server" />
            <ajaxToolkit:ModalPopupExtender ID="mpEliminate" runat="server" PopupControlID="Panel1"
                PopupDragHandleControlID="Panel1" TargetControlID="btnEliminate" BackgroundCssClass="plDisable"
                Y="70" X="20" />
            <ajaxToolkit:ModalPopupExtender ID="mpTransfer" runat="server" PopupControlID="Panel2"
                PopupDragHandleControlID="Panel1" TargetControlID="btnTransfer" BackgroundCssClass="plDisable"
                Y="70" X="20" />
            <ajaxToolkit:ModalPopupExtender ID="mpFlowER" runat="server" PopupControlID="Panel3"
                PopupDragHandleControlID="Panel1" TargetControlID="btnFlowER" BackgroundCssClass="plDisable"
                Y="70" X="20" />
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
